<?php
/**
 * Course Class Model
 *
 * Copyright 2012
 * @date 21-April-2012
 * @author
 * @version 0.0.1
 **/
class Survey extends AppModel {
    
    const INTVESTIGATE = 1;
    const EXAMINATION = 2;

    public function get_list(){
        $country_list = $this->find('list',array('fields'=>array('name')));
        return $country_list;
    }
    public static function get_name($id){
        $country = ClassRegistry::init('Survey');
        $country->id = $id;
        return $country->field('name');
    }
    public static function get_types(){
        return array(self::INTVESTIGATE=>"Investigate",  self::EXAMINATION=>"Examination");
    }
    public static function get_type($type) {
        if($type==self::INTVESTIGATE){
            return "Investigate";
        }
        return "Examination";
    }
}